package com.allwees.core.event.interceptor;

@FunctionalInterface
public interface LocalEventOperationInvoker {

	Object invoke() throws ThrowableWrapper;

	@SuppressWarnings("serial")
	class ThrowableWrapper extends RuntimeException {

		private final Throwable original;

		public ThrowableWrapper(Throwable original) {
			super(original.getMessage(), original);
			this.original = original;
		}

		public Throwable getOriginal() {
			return this.original;
		}
	}

}
